package o;

import com.google.android.exoplayer2.extractor.Extractor;
import com.google.android.exoplayer2.extractor.amr.AmrExtractor;
import com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor;
import com.google.android.exoplayer2.extractor.mp3.Mp3Extractor;
import com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor;
import com.google.android.exoplayer2.extractor.mp4.Mp4Extractor;
import com.google.android.exoplayer2.extractor.ts.AdtsExtractor;
import com.google.android.exoplayer2.extractor.ts.TsExtractor;
import java.lang.reflect.Constructor;

public final class adu implements adw {
    private static final Constructor<? extends Extractor> ˎ;
    private int ʻ;
    private int ʼ = 1;
    private int ʽ;
    private boolean ˊ;
    private int ˋ;
    private int ˏ;
    private int ॱ;
    private int ॱॱ;
    private int ᐝ;

    static {
        Constructor constructor = null;
        try {
            constructor = Class.forName("com.google.android.exoplayer2.ext.flac.FlacExtractor").asSubclass(Extractor.class).getConstructor(new Class[0]);
        } catch (ClassNotFoundException e) {
        } catch (Throwable e2) {
            throw new RuntimeException("Error instantiating FLAC extension", e2);
        }
        ˎ = constructor;
    }

    public synchronized Extractor[] ˋ() {
        Extractor[] extractorArr;
        int i = 12;
        int i2 = 1;
        synchronized (this) {
            if (ˎ != null) {
                i = 13;
            }
            extractorArr = new Extractor[i];
            extractorArr[0] = new MatroskaExtractor(this.ˏ);
            extractorArr[1] = new FragmentedMp4Extractor(this.ॱॱ);
            extractorArr[2] = new Mp4Extractor(this.ʽ);
            int i3 = this.ʻ;
            if (this.ˊ) {
                i = 1;
            } else {
                i = 0;
            }
            extractorArr[3] = new Mp3Extractor(i | i3);
            int i4 = this.ˋ;
            if (this.ˊ) {
                i = 1;
            } else {
                i = 0;
            }
            extractorArr[4] = new AdtsExtractor(0, i | i4);
            extractorArr[5] = new afw();
            extractorArr[6] = new TsExtractor(this.ʼ, this.ᐝ);
            extractorArr[7] = new aeg();
            extractorArr[8] = new afm();
            extractorArr[9] = new agm();
            extractorArr[10] = new agz();
            int i5 = this.ॱ;
            if (!this.ˊ) {
                i2 = 0;
            }
            extractorArr[11] = new AmrExtractor(i2 | i5);
            if (ˎ != null) {
                try {
                    extractorArr[12] = (Extractor) ˎ.newInstance(new Object[0]);
                } catch (Throwable e) {
                    throw new IllegalStateException("Unexpected error creating FLAC extractor", e);
                }
            }
        }
        return extractorArr;
    }
}
